<div class="lg_border2 w680" style="margin: 0px;width:762px;margin-bottom: 10px">
  <div class="title" style="width:748px">
    <a style="color:white" href="<?php echo site_url('promotion/show/' . $promotion['id'] . '/' . str_nice_name($promotion['title'])) ?>">
      <?php echo $promotion['title'] ?></a>
  </div>
  <div style="width: 762px">
    <div class="cpos_1">                  
      <div id="slideshow_<?php echo $promotion['id'] ?>" class="slideshow">
        <?php if (empty($promotion['medias'])) { ?>
          <a href="<?php echo site_url('promotion/show/' . $promotion['id'] . '/' . str_nice_name($promotion['title'])) ?>">                    
            <img width="450px" height="300px" 
                 src="<?php echo site_url('admin/promotion_media/preview') ?>" alt=""/>                    
          </a>
          <?php
        } else {
          foreach ($promotion['medias'] as $media) {
            ?>
            <a href="<?php echo site_url('promotion/show/' . $promotion['id'] . '/' . str_nice_name($promotion['title'])) ?>">                    
              <img width="450px" height="300px" 
                   src="<?php echo site_url('admin/promotion_media/preview/' . $media['id']) ?>" alt=""/>                    
            </a>
            <?php
          }
        }
        ?>
      </div>
    </div>
    <div class="center cpos_2 promotion_box">
      <div style="font-size: 20px; float: left; text-align: left;width:294px;margin-bottom: 2px;margin-top:10px;">
        <div style="width: 50%;float:left;text-align: center">
          <span style="color: black;"><?php echo $this->lang->line('front-end.label.promotion.available') ?></span><br/><br/>
          <span style="font-weight: bold;font-size: 180%;color: red;"><?php echo $promotion['remain'] ?></span>          
        </div>
        <div style="width: 50%;float:left;text-align: center">          
          <span style="color: black"><?php echo $this->lang->line('front-end.label.promotion.number.got') ?></span><br/><br/>
          <span style="font-weight: bold;font-size: 180%;color: red"><?php echo $promotion['num_got'] ?></span>
        </div>
      </div>
      <?php if($promotion['remain'] > 0) { ?>
      <div class="button_download big" style="float: left; padding-left: 65px;;margin-top:35px;margin-bottom: 35px">
        <a href="<?php echo site_url('promotion/download/' . $promotion['id'] . '/' . str_nice_name($promotion['title'])) ?>">&nbsp;</a>
      </div>
      <?php } else{ ?>
      <div class="button_download disabled" style="float: left; padding-left: 65px;;margin-top:35px;margin-bottom: 35px">
        <a href="#">&nbsp;</a>
      </div>  
      <?php } ?>
      <div style="color: red;font-size: 25px;margin-bottom:20px;margin-left:59px;width:200px;margin-top:20px" 
           id="remain_time_<?php echo $promotion['id'] ?>">
        <div id="wrapping">
          <div id="clock-ticker" class="clearfix">
            <div class="block">
              <footer class="label" style="font-size: 15px;line-height: 15px;color: gray">Days</footer>
              <span class="flip-top" id="numdays">00</span>
              <span class="flip-btm">&nbsp;</span>                            
            </div>

            <div class="block">
              <footer class="label" style="font-size: 15px;line-height: 15px;color: gray">Hours</footer>
              <span class="flip-top" id="numhours">00</span>
              <span class="flip-btm">&nbsp;</span>                            
            </div>

            <div class="block">
              <footer class="label" style="font-size: 15px;line-height: 15px;color: gray">Mins</footer>
              <span class="flip-top" id="nummins">00</span>
              <span class="flip-btm">&nbsp;</span>                            
            </div>

            <div class="block">
              <footer class="label" style="font-size: 15px;line-height: 15px;color: gray">Secs</footer>
              <span class="flip-top" id="numsecs">00</span>
              <span class="flip-btm">&nbsp;</span>                            
            </div>
          </div>
        </div>
      </div>                
      <div class="mg20" style="margin-top:10px">
        <div style="width: 65px;height: 20px;float: left">
          <img id = "share_button<?php echo $promotion['id'] ?>" style="width:65px;height:20px;" 
               src = "<?php echo base_url() . APPPATH ?>themes/user/img/share_button.png"/>
          <script>
            $(document).ready(function(){
              $('#share_button<?php echo $promotion['id'] ?>').click(function(e){
                e.preventDefault();
                FB.ui({
                  method: 'feed',
                  name: '<?php echo $promotion['title'] ?>',
                  link: '<?php echo site_url('promotion/show/' . $promotion['id'] . '/' . str_nice_name($promotion['title'])) ?>',
                  picture: '<?php echo site_url('admin/promotion_media/preview_promotion/' . $promotion['id']) ?>',
                  caption: '<?php echo $promotion['title'] ?>',
                  description: "<?php echo trim(strip_tags($promotion['description'])) ?>",
                  message: ''
                });
              });
            });
          </script> 
        </div>
        <div style="width: 110px;height: 20px;float: left;margin-right:10px;margin-left: 10px">
          <div class="fb-like" data-send="false" data-layout="button_count" data-width="100" data-show-faces="true"
               data-href="<?php echo site_url('promotion/show/' . $promotion['id'] . '/' . str_nice_name($promotion['title'])) ?>" 
               ></div>                      
        </div>
        <div style="width: 100px;height: 20px;float: left">
          <a href="https://twitter.com/share" class="twitter-share-button" style="float:right;"
             data-url="<?php echo site_url('promotion/show/' . $promotion['id'] . '/' . str_nice_name($promotion['title'])) ?>" 
             data-text="<?php echo $promotion['title'] ?>" data-via="iFreeListings">Tweet</a>		
        </div>                                           
      </div>
    </div>
  </div>
  <div class="clearer"></div> 
</div>